<template>
	<view class="cus-tab">
		<view class="tab-bar-item" @click="goPage(item)" v-for="item in tabBarList" :key="item.path">
			{{item.text}}
		</view>
	</view>
</template>

<script>
	export default {
		name:"cus-tab",
		data() {
			return {
				tabBarList: [
					{
						path: '/pages/index/index',
						text: '首页'
					},
					{
						path: '/pages/my/my',
						text: '我的'
					}
				]
			};
		},
		methods: {
			goPage(item) {
				uni.switchTab({
					url:item.path
				})
			}
		}
	}
</script>

<style lang="scss">
	.cus-tab{
		position: fixed;
		bottom: 0;
		width: 100%;
		background: #fff;
		display: flex;
		height: 100rpx;
		line-height: 100rpx;
		.tab-bar-item{
			width: 50%;
			text-align: center;
		}
	}
</style>